﻿using Furion.DatabaseAccessor;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BlazorOrdering.Core
{
    /// <summary>
    /// 取消订单记录
    /// </summary>
    public class CancellationOrder : Entity
    {

        [Required(ErrorMessage = "退订时间必填")]
        [DisplayName("退订时间")]
        [DisplayFormat(DataFormatString = "{0:yyyy年MM月dd日HH时mm分ss秒}")]
        public DateTime CancellTime { get; set; }


        [Required(ErrorMessage = "用餐日期必填")]
        [DisplayName("用餐日期")]
        [DisplayFormat(DataFormatString = "{0:yyyy年MM月dd日 dddd}")]
        public DateTime Day { get; set; }

        [Required(ErrorMessage = "订购人必填")]
        [DisplayName("用餐人员")]
        public string UserName { get; set; }


        [Required(ErrorMessage = "合计不能为空")]
        [Range(1, 9999, ErrorMessage = "合计不能大于{2} 不能小于{1}")]
        [DisplayName("合计")]
        public double Total { get; set; } = 0;

        [Required(ErrorMessage = "是否有早餐不能为空")]
        [DisplayName("是否含早餐")]
        public bool HasBreakfast { get; set; } = false;
    }
}
